gtkwindow: fix first allocation size
authorChristoph Reiter <creiter@src.gnome.org>
Fri, 1 Jan 2016 11:57:46 +0000 (12:57 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 3 Jan 2016 03:12:12 +0000 (22:12 -0500)
commit6d77b9f3162d9f3d9ea214b765b6f937e4439237
treef34d4c390a170bfbdd685ad31cd2eec1fe34f77a
parente93d64e4c3cdc71972bc92106763f29bfdc0abbf
gtkwindow: fix first allocation size

67ab00e01ec06d7b removed the fake configure code in gtk_window_show() and
replaced it with a simple gtk_widget_realize(). The initial allocation
code in realize() only allocates the natural size or the last requested
size which now no longer is set, resulting in a too small first allocation.

This builds a configure request to compute the allocation size instead
which includes default size, CSD etc..

This problem could be seen in case of a GtkPaned in a GtkWindow with a
default size set and the pane position set as well. The first allocation
would be the natural size of the GtkPaned which would clamp the pane
position if too larg. Only the second allocation would fill the parent
window using the now wrong pane position.

https://bugzilla.gnome.org/show_bug.cgi?id=759705
gtk/gtkwindow.c